﻿<UserControl x:Class="Microsoft.EnhancedReminders.OutlookAddIn.CalendarActionsControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:common="clr-namespace:Microsoft.EnhancedReminders;assembly=Microsoft.EnhancedReminders.Common"
    xmlns:properties="clr-namespace:Microsoft.EnhancedReminders.Properties"
    xmlns:ds="clr-namespace:Microsoft.EnhancedReminders.OutlookAddIn"
    xmlns:controls="clr-namespace:Microsoft.EnhancedReminders.OutlookAddIn;assembly=">

    <UserControl.Resources>
        <Style x:Key="DockPanelMargin">
            <Setter Property="StackPanel.Margin" Value="15,0,35,0"/>
        </Style>
        <Style x:Key="IndentedDockPanelMargin">
            <Setter Property="StackPanel.Margin" Value="25,0,35,0"/>
        </Style>
        <Thickness x:Key="PadChannelControl">0,0,0,50</Thickness>
	</UserControl.Resources>

    <StackPanel>
        <TabControl >
            <!-- Notification channels tab. -->
            <TabItem Header="{x:Static properties:Resources.ActionDialogNotificationHeader}">
                <StackPanel>

                    <DockPanel Style="{StaticResource DockPanelMargin}" >
                        <Label Content="{x:Static properties:Resources.ActionDialogSchedule}"/>
                        <Separator/>
                    </DockPanel>

                    <DockPanel Style="{StaticResource IndentedDockPanelMargin}">
                        <Image Height="32" Width="32"  Source="..\Images\Clock.png"></Image>
                        <TextBlock VerticalAlignment="Top" Margin="5,3,0,0" Text="{x:Static properties:Resources.ActionDialogScheduleLabel1}"/>
                        <ComboBox Name="absoluteTimeComboBox" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,25,0"
                                  SelectedIndex="{Binding Path=AbsoluteTimeIndex, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ds:CalendarActionsControl}}, Mode=TwoWay}">
                        </ComboBox>
                    </DockPanel>

                    <DockPanel Style="{StaticResource DockPanelMargin}">
                        <Label HorizontalAlignment="Center" Content="{x:Static properties:Resources.ChannelsSeparator}"/>
                        <Separator/>
                    </DockPanel>

                    <DockPanel Style="{StaticResource IndentedDockPanelMargin}">
                        <Image Height="32" Width="32" Source="..\Images\Channels.png"/>
                        <TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Margin="5,3,25,0" Text="{x:Static properties:Resources.ActionDialogChannelsLabel1}"/>
                    </DockPanel>

                    <controls:ReadOnlyChannelControl x:Name="notificationChannelControl" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{DynamicResource PadChannelControl}"/>
           
                </StackPanel>
            </TabItem>

            <!-- Join-now channels tab. -->
            <TabItem Header="{x:Static properties:Resources.ActionDialogJoinNowHeader}">
                <StackPanel>

                    <DockPanel Style="{StaticResource DockPanelMargin}">
                        <Label Content="{x:Static properties:Resources.ActionDialogSchedule}"/>
                        <Separator/>
                    </DockPanel>

                    <DockPanel Style="{StaticResource IndentedDockPanelMargin}">
                        <Image Height="32" Width="32"  Source="..\Images\Clock.png"/>
                        <TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Margin="5,3,0,0" MaxWidth="300" Text="{x:Static properties:Resources.ActionDialogScheduleLabel2}"/>
                        <ComboBox Name="leadTimeComboBox" VerticalAlignment="Top" Margin="10,0,25,0"
                                  SelectedIndex="{Binding Path=LeadTimeIndex, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ds:CalendarActionsControl}}, Mode=TwoWay}">
                        </ComboBox>
                    </DockPanel>

                    <DockPanel Style="{StaticResource DockPanelMargin}">
                        <Label HorizontalAlignment="Center" Content="{x:Static properties:Resources.ChannelsSeparator}"/>
                        <Separator/>
                    </DockPanel>

                    <DockPanel Style="{StaticResource IndentedDockPanelMargin}">
                        <Image Height="32" Width="32" Source="..\Images\Channels.png"/>
                        <TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Margin="5,3,25,0" Text="{x:Static properties:Resources.ActionDialogChannelsLabel2}"/>
                    </DockPanel>

                    <controls:ReadOnlyChannelControl x:Name="joinNowChannelControl" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{DynamicResource PadChannelControl}" />

                </StackPanel>

            </TabItem>

        </TabControl>
    </StackPanel>

</UserControl>
